<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
  <title>社交分享 - 多风格底部弹窗</title>
  <!-- Bootstrap 5 CSS -->
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
  <!-- Font Awesome -->
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css">
  
  <style>
    /* 基础样式 */
    body {
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
      background-color: #f5f5f5;
      min-height: 150vh; /* 为了能滚动 */
      padding-bottom: 20px;
    }
    
    .container {
      max-width: 540px;
      margin: 0 auto;
      padding: 0 15px;
    }
    
    /* 页面容器 */
    .page-container {
      display: none;
      padding-top: 20px;
    }
    
    .page-container.active {
      display: block;
    }
    
    /* 内容卡片 */
    .content-card {
      background-color: white;
      border-radius: 12px;
      overflow: hidden;
      box-shadow: 0 2px 10px rgba(0,0,0,0.05);
      margin-bottom: 20px;
    }
    
    .content-image {
      width: 100%;
      height: 200px;
      object-fit: cover;
    }
    
    .content-body {
      padding: 15px;
    }
    
    .content-title {
      font-size: 18px;
      font-weight: 600;
      margin-bottom: 8px;
    }
    
    .content-text {
      font-size: 14px;
      color: #666;
      line-height: 1.5;
      margin-bottom: 15px;
    }
    
    .content-meta {
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 12px;
      color: #999;
    }
    
    /* 操作按钮 */
    .action-buttons {
      display: flex;
      justify-content: center;
      gap: 20px;
      margin-top: 30px;
    }
    
    .action-btn {
      display: flex;
      flex-direction: column;
      align-items: center;
      background: none;
      border: none;
      padding: 10px;
      cursor: pointer;
    }
    
    .action-icon {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 18px;
      margin-bottom: 5px;
    }
    
    .action-text {
      font-size: 12px;
      font-weight: 500;
    }
    
    /* 分享弹窗 */
    .share-overlay {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background-color: rgba(0,0,0,0.5);
      display: none;
      z-index: 1000;
    }
    
    .share-popup {
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      max-width: 540px;
      margin: 0 auto;
      border-radius: 16px 16px 0 0;
      transform: translateY(100%);
      transition: transform 0.3s ease-out;
      z-index: 1001;
    }
    
    .share-popup.active {
      transform: translateY(0);
    }
    
    .share-header {
      padding: 15px;
      text-align: center;
      border-bottom: 1px solid;
    }
    
    .share-title {
      font-size: 18px;
      font-weight: 600;
      margin: 0;
    }
    
    .share-close {
      position: absolute;
      top: 15px;
      right: 15px;
      background: none;
      border: none;
      font-size: 20px;
      cursor: pointer;
    }
    
    .share-body {
      padding: 20px 15px;
    }
    
    .share-options {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 20px;
    }
    
    .share-option {
      display: flex;
      flex-direction: column;
      align-items: center;
      width: 60px;
      cursor: pointer;
    }
    
    .share-icon {
      width: 50px;
      height: 50px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 24px;
      margin-bottom: 8px;
      transition: transform 0.2s;
    }
    
    .share-option:hover .share-icon {
      transform: scale(1.1);
    }
    
    .share-name {
      font-size: 12px;
      text-align: center;
    }
    
    .share-cancel {
      width: 90%;
      margin: 15px auto 5px;
      padding: 12px 0;
      border-radius: 8px;
      font-size: 16px;
      font-weight: 500;
      border: none;
      cursor: pointer;
    }
    
    /* 风格切换器 */
    .style-switcher {
      position: fixed;
      top: 20px;
      right: 20px;
      z-index: 100;
      background-color: white;
      border-radius: 30px;
      box-shadow: 0 4px 15px rgba(0,0,0,0.1);
      padding: 8px;
      display: flex;
      gap: 5px;
    }
    
    .style-btn {
      width: 30px;
      height: 30px;
      border-radius: 50%;
      border: none;
      cursor: pointer;
      transition: transform 0.2s;
    }
    
    .style-btn:hover {
      transform: scale(1.1);
    }
    
    .style-btn.active {
      box-shadow: 0 0 0 2px white, 0 0 0 4px #0d6efd;
    }
    
    /* 风格1 - 经典蓝 */
    .style-1 {
      color: #212529;
    }
    
    .style-1 .action-icon {
      background-color: #e7f1ff;
      color: #0d6efd;
    }
    
    .style-1 .action-text {
      color: #0d6efd;
    }
    
    .style-1 .share-popup {
      background-color: white;
    }
    
    .style-1 .share-header {
      border-color: #eee;
    }
    
    .style-1 .share-close {
      color: #666;
    }
    
    .style-1 .share-icon {
      background-color: #e7f1ff;
      color: #0d6efd;
    }
    
    .style-1 .share-cancel {
      background-color: #f5f5f5;
      color: #666;
    }
    
    /* 风格2 - 活力橙 */
    .style-2 {
      color: #212529;
    }
    
    .style-2 .action-icon {
      background-color: #fff3cd;
      color: #fd7e14;
    }
    
    .style-2 .action-text {
      color: #fd7e14;
    }
    
    .style-2 .share-popup {
      background-color: white;
    }
    
    .style-2 .share-header {
      border-color: #f8f9fa;
    }
    
    .style-2 .share-close {
      color: #666;
    }
    
    .style-2 .share-icon {
      background-color: #fff3cd;
      color: #fd7e14;
    }
    
    .style-2 .share-cancel {
      background-color: #f5f5f5;
      color: #666;
    }
    
    /* 风格3 - 暗黑系 */
    .style-3 {
      color: #f8f9fa;
      background-color: #212529;
    }
    
    .style-3 .content-card {
      background-color: #343a40;
      box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    }
    
    .style-3 .content-text,
    .style-3 .content-meta {
      color: #adb5bd;
    }
    
    .style-3 .action-icon {
      background-color: #495057;
      color: #f8f9fa;
    }
    
    .style-3 .action-text {
      color: #f8f9fa;
    }
    
    .style-3 .share-popup {
      background-color: #343a40;
    }
    
    .style-3 .share-header {
      border-color: #495057;
    }
    
    .style-3 .share-close {
      color: #adb5bd;
    }
    
    .style-3 .share-icon {
      background-color: #495057;
      color: #f8f9fa;
    }
    
    .style-3 .share-cancel {
      background-color: #495057;
      color: #f8f9fa;
    }
    
    /* 风格4 - 清新绿 */
    .style-4 {
      color: #212529;
    }
    
    .style-4 .action-icon {
      background-color: #d1e7dd;
      color: #198754;
    }
    
    .style-4 .action-text {
      color: #198754;
    }
    
    .style-4 .share-popup {
      background-color: white;
    }
    
    .style-4 .share-header {
      border-color: #e9ecef;
    }
    
    .style-4 .share-close {
      color: #666;
    }
    
    .style-4 .share-icon {
      background-color: #d1e7dd;
      color: #198754;
    }
    
    .style-4 .share-cancel {
      background-color: #f5f5f5;
      color: #666;
    }
  </style>
</head>
<body>
  <!-- 风格切换器 -->
  <div class="style-switcher">
    <button class="style-btn active" data-style="1" style="background-color: #0d6efd;"></button>
    <button class="style-btn" data-style="2" style="background-color: #fd7e14;"></button>
    <button class="style-btn" data-style="3" style="background-color: #343a40;"></button>
    <button class="style-btn" data-style="4" style="background-color: #198754;"></button>
  </div>
  
  <!-- 风格1 - 经典蓝 -->
  <div class="page-container style-1 active" data-style="1">
    <div class="container">
      <div class="content-card">
        <img src="https://picsum.photos/600/200?random=1" alt="内容图片" class="content-image">
        <div class="content-body">
          <h3 class="content-title">探索城市中的隐秘角落</h3>
          <p class="content-text">
            这座城市中有许多不为人知的美丽角落，等待着人们去发现。从老街区的小巷到城市公园的深处，每一个地方都有其独特的故事和风景。
          </p>
          <div class="content-meta">
            <span>旅行探索 · 2小时前</span>
            <span>128 次浏览</span>
          </div>
        </div>
      </div>
      
      <div class="content-card">
        <img src="https://picsum.photos/600/200?random=2" alt="内容图片" class="content-image">
        <div class="content-body">
          <h3 class="content-title">季节性美食推荐：初夏尝鲜</h3>
          <p class="content-text">
            随着初夏的到来，各种新鲜食材纷纷上市。本文推荐几款适合初夏品尝的时令美食，从清爽的沙拉到鲜美的海鲜，让你的味蕾感受夏天的味道。
          </p>
          <div class="content-meta">
            <span>美食指南 · 昨天</span>
            <span>356 次浏览</span>
          </div>
        </div>
      </div>
      
      <div class="action-buttons">
        <button class="action-btn like-btn">
          <div class="action-icon">
            <i class="fa fa-heart-o"></i>
          </div>
          <span class="action-text">喜欢</span>
        </button>
        <button class="action-btn comment-btn">
          <div class="action-icon">
            <i class="fa fa-comment-o"></i>
          </div>
          <span class="action-text">评论</span>
        </button>
        <button class="action-btn share-btn">
          <div class="action-icon">
            <i class="fa fa-share-alt"></i>
          </div>
          <span class="action-text">分享</span>
        </button>
        <button class="action-btn save-btn">
          <div class="action-icon">
            <i class="fa fa-bookmark-o"></i>
          </div>
          <span class="action-text">收藏</span>
        </button>
      </div>
    </div>
  </div>
  
  <!-- 风格2 - 活力橙 -->
  <div class="page-container style-2" data-style="2">
    <div class="container">
      <div class="content-card">
        <img src="https://picsum.photos/600/200?random=3" alt="内容图片" class="content-image">
        <div class="content-body">
          <h3 class="content-title">探索城市中的隐秘角落</h3>
          <p class="content-text">
            这座城市中有许多不为人知的美丽角落，等待着人们去发现。从老街区的小巷到城市公园的深处，每一个地方都有其独特的故事和风景。
          </p>
          <div class="content-meta">
            <span>旅行探索 · 2小时前</span>
            <span>128 次浏览</span>
          </div>
        </div>
      </div>
      
      <div class="content-card">
        <img src="https://picsum.photos/600/200?random=4" alt="内容图片" class="content-image">
        <div class="content-body">
          <h3 class="content-title">季节性美食推荐：初夏尝鲜</h3>
          <p class="content-text">
            随着初夏的到来，各种新鲜食材纷纷上市。本文推荐几款适合初夏品尝的时令美食，从清爽的沙拉到鲜美的海鲜，让你的味蕾感受夏天的味道。
          </p>
          <div class="content-meta">
            <span>美食指南 · 昨天</span>
            <span>356 次浏览</span>
          </div>
        </div>
      </div>
      
      <div class="action-buttons">
        <button class="action-btn like-btn">
          <div class="action-icon">
            <i class="fa fa-heart-o"></i>
          </div>
          <span class="action-text">喜欢</span>
        </button>
        <button class="action-btn comment-btn">
          <div class="action-icon">
            <i class="fa fa-comment-o"></i>
          </div>
          <span class="action-text">评论</span>
        </button>
        <button class="action-btn share-btn">
          <div class="action-icon">
            <i class="fa fa-share-alt"></i>
          </div>
          <span class="action-text">分享</span>
        </button>
        <button class="action-btn save-btn">
          <div class="action-icon">
            <i class="fa fa-bookmark-o"></i>
          </div>
          <span class="action-text">收藏</span>
        </button>
      </div>
    </div>
  </div>
  
  <!-- 风格3 - 暗黑系 -->
  <div class="page-container style-3" data-style="3">
    <div class="container">
      <div class="content-card">
        <img src="https://picsum.photos/600/200?random=5" alt="内容图片" class="content-image">
        <div class="content-body">
          <h3 class="content-title">探索城市中的隐秘角落</h3>
          <p class="content-text">
            这座城市中有许多不为人知的美丽角落，等待着人们去发现。从老街区的小巷到城市公园的深处，每一个地方都有其独特的故事和风景。
          </p>
          <div class="content-meta">
            <span>旅行探索 · 2小时前</span>
            <span>128 次浏览</span>
          </div>
        </div>
      </div>
      
      <div class="content-card">
        <img src="https://picsum.photos/600/200?random=6" alt="内容图片" class="content-image">
        <div class="content-body">
          <h3 class="content-title">季节性美食推荐：初夏尝鲜</h3>
          <p class="content-text">
            随着初夏的到来，各种新鲜食材纷纷上市。本文推荐几款适合初夏品尝的时令美食，从清爽的沙拉到鲜美的海鲜，让你的味蕾感受夏天的味道。
          </p>
          <div class="content-meta">
            <span>美食指南 · 昨天</span>
            <span>356 次浏览</span>
          </div>
        </div>
      </div>
      
      <div class="action-buttons">
        <button class="action-btn like-btn">
          <div class="action-icon">
            <i class="fa fa-heart-o"></i>
          </div>
          <span class="action-text">喜欢</span>
        </button>
        <button class="action-btn comment-btn">
          <div class="action-icon">
            <i class="fa fa-comment-o"></i>
          </div>
          <span class="action-text">评论</span>
        </button>
        <button class="action-btn share-btn">
          <div class="action-icon">
            <i class="fa fa-share-alt"></i>
          </div>
          <span class="action-text">分享</span>
        </button>
        <button class="action-btn save-btn">
          <div class="action-icon">
            <i class="fa fa-bookmark-o"></i>
          </div>
          <span class="action-text">收藏</span>
        </button>
      </div>
    </div>
  </div>
  
  <!-- 风格4 - 清新绿 -->
  <div class="page-container style-4" data-style="4">
    <div class="container">
      <div class="content-card">
        <img src="https://picsum.photos/600/200?random=7" alt="内容图片" class="content-image">
        <div class="content-body">
          <h3 class="content-title">探索城市中的隐秘角落</h3>
          <p class="content-text">
            这座城市中有许多不为人知的美丽角落，等待着人们去发现。从老街区的小巷到城市公园的深处，每一个地方都有其独特的故事和风景。
          </p>
          <div class="content-meta">
            <span>旅行探索 · 2小时前</span>
            <span>128 次浏览</span>
          </div>
        </div>
      </div>
      
      <div class="content-card">
        <img src="https://picsum.photos/600/200?random=8" alt="内容图片" class="content-image">
        <div class="content-body">
          <h3 class="content-title">季节性美食推荐：初夏尝鲜</h3>
          <p class="content-text">
            随着初夏的到来，各种新鲜食材纷纷上市。本文推荐几款适合初夏品尝的时令美食，从清爽的沙拉到鲜美的海鲜，让你的味蕾感受夏天的味道。
          </p>
          <div class="content-meta">
            <span>美食指南 · 昨天</span>
            <span>356 次浏览</span>
          </div>
        </div>
      </div>
      
      <div class="action-buttons">
        <button class="action-btn like-btn">
          <div class="action-icon">
            <i class="fa fa-heart-o"></i>
          </div>
          <span class="action-text">喜欢</span>
        </button>
        <button class="action-btn comment-btn">
          <div class="action-icon">
            <i class="fa fa-comment-o"></i>
          </div>
          <span class="action-text">评论</span>
        </button>
        <button class="action-btn share-btn">
          <div class="action-icon">
            <i class="fa fa-share-alt"></i>
          </div>
          <span class="action-text">分享</span>
        </button>
        <button class="action-btn save-btn">
          <div class="action-icon">
            <i class="fa fa-bookmark-o"></i>
          </div>
          <span class="action-text">收藏</span>
        </button>
      </div>
    </div>
  </div>
  
  <!-- 分享弹窗 -->
  <div class="share-overlay"></div>
  <div class="share-popup">
    <div class="share-header">
      <h3 class="share-title">分享到</h3>
      <button class="share-close">
        <i class="fa fa-times"></i>
      </button>
    </div>
    <div class="share-body">
      <div class="share-options">
        <div class="share-option" data-platform="weixin">
          <div class="share-icon">
            <i class="fa fa-weixin"></i>
          </div>
          <span class="share-name">微信好友</span>
        </div>
        <div class="share-option" data-platform="weixin-circle">
          <div class="share-icon">
            <i class="fa fa-weixin"></i>
          </div>
          <span class="share-name">微信朋友圈</span>
        </div>
        <div class="share-option" data-platform="qq">
          <div class="share-icon">
            <i class="fa fa-qq"></i>
          </div>
          <span class="share-name">QQ好友</span>
        </div>
        <div class="share-option" data-platform="qq-space">
          <div class="share-icon">
            <i class="fa fa-star-o"></i>
          </div>
          <span class="share-name">QQ空间</span>
        </div>
        <div class="share-option" data-platform="微博">
          <div class="share-icon">
            <i class="fa fa-weibo"></i>
          </div>
          <span class="share-name">微博</span>
        </div>
        <div class="share-option" data-platform="link">
          <div class="share-icon">
            <i class="fa fa-link"></i>
          </div>
          <span class="share-name">复制链接</span>
        </div>
        <div class="share-option" data-platform="image">
          <div class="share-icon">
            <i class="fa fa-image"></i>
          </div>
          <span class="share-name">生成图片</span>
        </div>
        <div class="share-option" data-platform="more">
          <div class="share-icon">
            <i class="fa fa-ellipsis-h"></i>
          </div>
          <span class="share-name">更多</span>
        </div>
      </div>
      <button class="share-cancel">取消</button>
    </div>
  </div>
  
  <!-- 分享成功提示 -->
  <div class="toast-container position-fixed top-50 start-50 translate-middle z-50">
    <div class="toast align-items-center text-white bg-success border-0" role="alert" aria-live="assertive" aria-atomic="true" id="shareToast">
      <div class="d-flex">
        <div class="toast-body">
          分享成功！
        </div>
        <button type="button" class="btn-close btn-close-white me-2 m-auto" data-bs-dismiss="toast" aria-label="Close"></button>
      </div>
    </div>
  </div>
  
  <!-- Bootstrap JS -->
  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
  
  <script>
    // 获取当前激活的页面容器
    function getActivePage() {
      return document.querySelector('.page-container.active');
    }
    
    // 风格切换功能
    const styleBtns = document.querySelectorAll('.style-btn');
    const pageContainers = document.querySelectorAll('.page-container');
    const sharePopup = document.querySelector('.share-popup');
    
    styleBtns.forEach(btn => {
      btn.addEventListener('click', function() {
        // 移除所有活跃状态
        styleBtns.forEach(b => b.classList.remove('active'));
        pageContainers.forEach(page => page.classList.remove('active'));
        
        // 添加当前活跃状态
        this.classList.add('active');
        const style = this.getAttribute('data-style');
        document.querySelector(`.page-container[data-style="${style}"]`).classList.add('active');
        
        // 更新分享弹窗样式
        updateSharePopupStyle(style);
      });
    });
    
    // 更新分享弹窗样式
    function updateSharePopupStyle(style) {
      // 移除所有风格类
      sharePopup.className = sharePopup.className.replace(/style-\d+/g, '');
      // 添加当前风格类
      sharePopup.classList.add(`style-${style}`);
    }
    
    // 初始化分享弹窗样式
    updateSharePopupStyle(1);
    
    // 打开分享弹窗
    function openSharePopup() {
      document.querySelector('.share-overlay').style.display = 'block';
      sharePopup.classList.add('active');
      document.body.style.overflow = 'hidden';
    }
    
    // 关闭分享弹窗
    function closeSharePopup() {
      document.querySelector('.share-overlay').style.display = 'none';
      sharePopup.classList.remove('active');
      document.body.style.overflow = 'auto';
    }
    
    // 分享按钮点击事件
    document.querySelectorAll('.share-btn').forEach(btn => {
      btn.addEventListener('click', function() {
        if (this.closest('.page-container.active')) {
          openSharePopup();
        }
      });
    });
    
    // 关闭分享弹窗事件
    document.querySelector('.share-close').addEventListener('click', closeSharePopup);
    document.querySelector('.share-cancel').addEventListener('click', closeSharePopup);
    document.querySelector('.share-overlay').addEventListener('click', closeSharePopup);
    
    // 分享选项点击事件
    document.querySelectorAll('.share-option').forEach(option => {
      option.addEventListener('click', function() {
        const platform = this.getAttribute('data-platform');
        console.log(`分享到: ${platform}`);
        
        // 显示分享成功提示
        const toast = new bootstrap.Toast(document.getElementById('shareToast'));
        toast.show();
        
        // 延迟关闭分享弹窗
        setTimeout(closeSharePopup, 800);
      });
    });
    
    // 其他操作按钮交互
    document.querySelectorAll('.like-btn').forEach(btn => {
      btn.addEventListener('click', function() {
        const icon = this.querySelector('.action-icon i');
        if (icon.classList.contains('fa-heart-o')) {
          icon.classList.remove('fa-heart-o');
          icon.classList.add('fa-heart');
        } else {
          icon.classList.remove('fa-heart');
          icon.classList.add('fa-heart-o');
        }
      });
    });
    
    document.querySelectorAll('.save-btn').forEach(btn => {
      btn.addEventListener('click', function() {
        const icon = this.querySelector('.action-icon i');
        if (icon.classList.contains('fa-bookmark-o')) {
          icon.classList.remove('fa-bookmark-o');
          icon.classList.add('fa-bookmark');
        } else {
          icon.classList.remove('fa-bookmark');
          icon.classList.add('fa-bookmark-o');
        }
      });
    });
    
    document.querySelectorAll('.comment-btn').forEach(btn => {
      btn.addEventListener('click', function() {
        alert('打开评论区');
      });
    });
  </script>
</body>
</html>
